Revision 2fddbb68 libavformat/rtp_h264.c

View differences:

libavformat/rtp_h264.c
78 78
    assert(h264_data != NULL);
79 79

  
80 80
    if (!strcmp(attr, "packetization-mode")) {
81
        av_log(NULL, AV_LOG_DEBUG, "H.264/RTP Packetization Mode: %d\n", atoi(value));
81
        av_log(codec, AV_LOG_DEBUG, "RTP Packetization Mode: %d\n", atoi(value));
82 82
        h264_data->packetization_mode = atoi(value);
83 83
        /*
84 84
           Packetization Mode:
......
87 87
           2: Interleaved Mode: 25 (STAP-B), 26 (MTAP16), 27 (MTAP24), 28 (FU-A), and 29 (FU-B) are allowed.
88 88
         */
89 89
        if (h264_data->packetization_mode > 1)
90
            av_log(stream, AV_LOG_ERROR,
91
                   "H.264/RTP Interleaved RTP mode is not supported yet.");
90
            av_log(codec, AV_LOG_ERROR,
91
                   "Interleaved RTP mode is not supported yet.");
92 92
    } else if (!strcmp(attr, "profile-level-id")) {
93 93
        if (strlen(value) == 6) {
94 94
            char buffer[3];
......
105 105
            level_idc = strtol(buffer, NULL, 16);
106 106

  
107 107
            // set the parameters...
108
            av_log(NULL, AV_LOG_DEBUG,
109
                   "H.264/RTP Profile IDC: %x Profile IOP: %x Level: %x\n",
108
            av_log(codec, AV_LOG_DEBUG,
109
                   "RTP Profile IDC: %x Profile IOP: %x Level: %x\n",
110 110
                   profile_idc, profile_iop, level_idc);
111 111
            h264_data->profile_idc = profile_idc;
112 112
            h264_data->profile_iop = profile_iop;
......
150 150
                    codec->extradata= dest;
151 151
                    codec->extradata_size+= sizeof(start_sequence)+packet_size;
152 152
                } else {
153
                    av_log(NULL, AV_LOG_ERROR, "H.264/RTP Unable to allocate memory for extradata!");
153
                    av_log(codec, AV_LOG_ERROR, "Unable to allocate memory for extradata!");
154 154
                }
155 155
            }
156 156
        }
157
        av_log(NULL, AV_LOG_DEBUG, "H.264/RTP Extradata set to %p (size: %d)!", codec->extradata, codec->extradata_size);
157
        av_log(codec, AV_LOG_DEBUG, "Extradata set to %p (size: %d)!", codec->extradata, codec->extradata_size);
158 158
    }
159 159
}
160 160

  
......
231 231
                            dst+= nal_size;
232 232
                        }
233 233
                    } else {
234
                        av_log(NULL, AV_LOG_ERROR,
234
                        av_log(ctx, AV_LOG_ERROR,
235 235
                               "nal size exceeds length: %d %d\n", nal_size, src_len);
236 236
                    }
237 237

  
......
240 240
                    src_len -= nal_size;
241 241

  
242 242
                    if (src_len < 0)
243
                        av_log(NULL, AV_LOG_ERROR,
243
                        av_log(ctx, AV_LOG_ERROR,
244 244
                               "Consumed more bytes than we got! (%d)\n", src_len);
245 245
                } while (src_len > 2);      // because there could be rtp padding..
246 246

  
......
259 259
    case 26:                   // MTAP-16
260 260
    case 27:                   // MTAP-24
261 261
    case 29:                   // FU-B
262
        av_log(NULL, AV_LOG_ERROR,
262
        av_log(ctx, AV_LOG_ERROR,
263 263
               "Unhandled type (%d) (See RFC for implementation details\n",
264 264
               type);
265 265
        result= -1;
......
305 305
    case 30:                   // undefined
306 306
    case 31:                   // undefined
307 307
    default:
308
        av_log(NULL, AV_LOG_ERROR, "Undefined type (%d)", type);
308
        av_log(ctx, AV_LOG_ERROR, "Undefined type (%d)", type);
309 309
        result= -1;
310 310
        break;
311 311
    }

Also available in: Unified diff