mpegts: log into an AVFormatContext rather than MpegTSContext.
authorAlex Converse <alex.converse@gmail.com>
Tue, 16 Aug 2011 01:14:12 +0000 (18:14 -0700)
committerAlex Converse <alex.converse@gmail.com>
Tue, 16 Aug 2011 18:09:39 +0000 (11:09 -0700)
MpegTSContext's AVClass member can be NULL.

libavformat/mpegts.c

index f22edec..fa5bd4c 100644 (file)
@@ -628,7 +628,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
 
     if(pes->total_size != MAX_PES_PAYLOAD &&
        pes->pes_header_size + pes->data_index != pes->total_size + 6) {
-        av_log(pes->ts, AV_LOG_WARNING, "PES packet size mismatch\n");
+        av_log(pes->stream, AV_LOG_WARNING, "PES packet size mismatch\n");
         pes->flags |= AV_PKT_FLAG_CORRUPT;
     }
     memset(pkt->data+pkt->size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
@@ -1293,7 +1293,7 @@ static int handle_packet(MpegTSContext *ts, const uint8_t *packet)
 
     tss->last_cc = cc;
     if (!cc_ok) {
-        av_log(ts, AV_LOG_WARNING, "Continuity Check Failed\n");
+        av_log(ts->stream, AV_LOG_WARNING, "Continuity Check Failed\n");
         if(tss->type == MPEGTS_PES) {
             PESContext *pc = tss->u.pes_filter.opaque;
             pc->flags |= AV_PKT_FLAG_CORRUPT;