1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

skip no more needed on error

Originally committed as revision 9192 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2007-06-03 18:04:33 +00:00
parent 01dfc64669
commit 151bdd5d3d

View File

@ -297,16 +297,20 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
// source klv key // source klv key
klv_decode_ber_length(pb); klv_decode_ber_length(pb);
get_buffer(pb, klv->key, 16); get_buffer(pb, klv->key, 16);
if (!IS_KLV_KEY(klv, mxf_essence_element_key)) goto err_out; if (!IS_KLV_KEY(klv, mxf_essence_element_key))
return -1;
index = mxf_get_stream_index(s, klv); index = mxf_get_stream_index(s, klv);
if (index < 0) goto err_out; if (index < 0)
return -1;
// source size // source size
klv_decode_ber_length(pb); klv_decode_ber_length(pb);
orig_size = get_be64(pb); orig_size = get_be64(pb);
if (orig_size < plaintext_size) goto err_out; if (orig_size < plaintext_size)
return -1;
// enc. code // enc. code
size = klv_decode_ber_length(pb); size = klv_decode_ber_length(pb);
if (size < 32 || size - 32 < orig_size) goto err_out; if (size < 32 || size - 32 < orig_size)
return -1;
get_buffer(pb, ivec, 16); get_buffer(pb, ivec, 16);
get_buffer(pb, tmpbuf, 16); get_buffer(pb, tmpbuf, 16);
if (mxf->aesc) if (mxf->aesc)
@ -323,10 +327,6 @@ static int mxf_decrypt_triplet(AVFormatContext *s, AVPacket *pkt, KLVPacket *klv
pkt->stream_index = index; pkt->stream_index = index;
url_fskip(pb, end - url_ftell(pb)); url_fskip(pb, end - url_ftell(pb));
return 0; return 0;
err_out:
url_fskip(pb, end - url_ftell(pb));
return -1;
} }
static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt)