aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-17 22:53:51 +0100
committerAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2016-11-27 00:38:57 +0100
commit1c282152c1c7ca23c388ecb04e9997030fbba19a (patch)
treef71ba6fb88e572a3adf3105f827dd0d0763e624b
parent4ffd5805af4a8734d238e561daa63c7b3be5eedb (diff)
downloadffmpeg-1c282152c1c7ca23c388ecb04e9997030fbba19a.tar.gz
mxfdec: fix NULL pointer dereference in mxf_read_packet_old
Metadata streams have priv_data set to NULL. Reviewed-by: Josh de Kock <josh@itanimul.li> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> (cherry picked from commit fdb8c455b637f86e2e85503b7e090fa448164398) Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 9e505daff6..f214b36e3c 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3012,7 +3012,7 @@ static int mxf_read_packet_old(AVFormatContext *s, AVPacket *pkt)
if (mxf->nb_index_tables >= 1 && mxf->current_edit_unit < t->nb_ptses) {
pkt->dts = mxf->current_edit_unit + t->first_dts;
pkt->pts = t->ptses[mxf->current_edit_unit];
- } else if (track->intra_only) {
+ } else if (track && track->intra_only) {
/* intra-only -> PTS = EditUnit.
* let utils.c figure out DTS since it can be < PTS if low_delay = 0 (Sony IMX30) */
pkt->pts = mxf->current_edit_unit;