Author: michael Date: Thu Apr 16 06:46:44 2009 New Revision: 18533 Log: Support broken avc nal encapsulation. Fixes issue987. Modified: trunk/libavcodec/h264.c Modified: trunk/libavcodec/h264.c ============================================================================== --- trunk/libavcodec/h264.c Thu Apr 16 04:28:49 2009 (r18532) +++ trunk/libavcodec/h264.c Thu Apr 16 06:46:44 2009 (r18533) @@ -7461,6 +7461,7 @@ static int decode_nal_units(H264Context int buf_index=0; H264Context *hx; ///< thread context int context_count = 0; + int next_avc= h->is_avc ? 0 : buf_size; h->max_contexts = avctx->thread_count; #if 0 @@ -7484,7 +7485,7 @@ static int decode_nal_units(H264Context int i, nalsize = 0; int err; - if(h->is_avc) { + if(buf_index >= next_avc) { if(buf_index >= buf_size) break; nalsize = 0; for(i = 0; i < h->nal_length_size; i++) @@ -7498,6 +7499,7 @@ static int decode_nal_units(H264Context break; } } + next_avc= buf_index + nalsize; } else { // start code prefix search for(; buf_index + 3 < buf_size; buf_index++){ @@ -7513,7 +7515,7 @@ static int decode_nal_units(H264Context hx = h->thread_context[context_count]; - ptr= ff_h264_decode_nal(hx, buf + buf_index, &dst_length, &consumed, h->is_avc ? nalsize : buf_size - buf_index); + ptr= ff_h264_decode_nal(hx, buf + buf_index, &dst_length, &consumed, next_avc - buf_index); if (ptr==NULL || dst_length < 0){ return -1; } @@ -7525,13 +7527,12 @@ static int decode_nal_units(H264Context av_log(h->s.avctx, AV_LOG_DEBUG, "NAL %d at %d/%d length %d\n", hx->nal_unit_type, buf_index, buf_size, dst_length); } - if (h->is_avc && (nalsize != consumed)){ + if (h->is_avc && (nalsize != consumed) && nalsize){ int i, debug_level = AV_LOG_DEBUG; for (i = consumed; i < nalsize; i++) if (buf[buf_index+i]) debug_level = AV_LOG_ERROR; av_log(h->s.avctx, debug_level, "AVC: Consumed only %d bytes instead of %d\n", consumed, nalsize); - consumed= nalsize; } buf_index += consumed;
michael <subversion <at> mplayerhq.hu> writes:
Author: michael Date: Thu Apr 16 06:46:44 2009 New Revision: 18533
Log: Support broken avc nal encapsulation. Fixes issue987.
This commit broke the sample from issue 1550 (incoming/issue1550) Carl Eugen
On Tue, Nov 17, 2009 at 06:49:29PM +0000, Carl Eugen Hoyos wrote:
michael <subversion <at> mplayerhq.hu> writes:
Author: michael Date: Thu Apr 16 06:46:44 2009 New Revision: 18533
Log: Support broken avc nal encapsulation. Fixes issue987.
This commit broke the sample from issue 1550 (incoming/issue1550)
I wont touch roundup until its ML works again I dont think its a good idea to change things on roundup while its in such odd state. Besides it is majorly inconvenient. The extra time it costs me now to fight with its webinterface i can spend reviewing patches that i shoul review and once roundupo has been fixed you can remind me to look at this one ... [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes
Hi Michael! Michael Niedermayer <michaelni <at> gmx.at> writes:
New Revision: 18533
Log: Support broken avc nal encapsulation. Fixes issue987.
This commit broke the sample from issue 1550 (incoming/issue1550)
I wont touch roundup until its ML works again I dont think its a good idea to change things on roundup while its in such odd state. Besides it is majorly inconvenient.
I have absolutely no problem not to look at roundup for some time. But how should I know that the ML is broken: I am not subscribed to the list... btw: Does the maintainer know that the ML is broken?
The extra time it costs me now to fight with its webinterface i can spend reviewing patches that i shoul review and once roundupo has been fixed you can remind me to look at this one ...
Or I can repeat the (simple) facts: incoming/issue1550/ffmpeg.broken.clip.mkv decodes correctly with r18532, does not decode at all (=mostly grey, heavy corruption) since r18533. Carl Eugen
On Tue, Nov 17, 2009 at 10:47:05PM +0000, Carl Eugen Hoyos wrote:
Hi Michael!
Michael Niedermayer <michaelni <at> gmx.at> writes:
New Revision: 18533
Log: Support broken avc nal encapsulation. Fixes issue987.
This commit broke the sample from issue 1550 (incoming/issue1550)
I wont touch roundup until its ML works again I dont think its a good idea to change things on roundup while its in such odd state. Besides it is majorly inconvenient.
I have absolutely no problem not to look at roundup for some time.
What iam really concerned about is that if the ML is fixed, a large chunk of changes might be missing of it while i work 99% with the ML, missing changes would do no good for this ... things like "hey ive alraedy sent a patch why did you reimplement it" or "hey ive already awnsered that why do you close due to lack of an awnser!?"
But how should I know that the ML is broken: I am not subscribed to the list...
btw: Does the maintainer know that the ML is broken?
i dont know, i assumed someone told luca by now, that probably wasnt wise from me. Ill CC this mail to him.
The extra time it costs me now to fight with its webinterface i can spend reviewing patches that i shoul review and once roundupo has been fixed you can remind me to look at this one ...
Or I can repeat the (simple) facts: incoming/issue1550/ffmpeg.broken.clip.mkv decodes correctly with r18532, does not decode at all (=mostly grey, heavy corruption) since r18533.
If i fix it should i update roundup and live with another missing change on the ML or should i not? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
Michael Niedermayer <michaelni <at> gmx.at> writes:
incoming/issue1550/ffmpeg.broken.clip.mkv decodes correctly with r18532, does not decode at all (=mostly grey, heavy corruption) since r18533.
If i fix it should i update roundup and live with another missing change on the ML or should i not?
If you fix it, I will close the issue and you will either receive all messages or none concerning this issue. Carl Eugen
On Wed, Nov 18, 2009 at 09:17:09AM +0000, Carl Eugen Hoyos wrote:
Michael Niedermayer <michaelni <at> gmx.at> writes:
incoming/issue1550/ffmpeg.broken.clip.mkv decodes correctly with r18532, does not decode at all (=mostly grey, heavy corruption) since r18533.
If i fix it should i update roundup and live with another missing change on the ML or should i not?
If you fix it, I will close the issue and you will either receive all messages or none concerning this issue.
if i dont fix it soon i likely will forget about it because i use the ML to keep track of which issues i still need to look at. (and thats quite a few) That also means all issues opened while the ML is broken will not be seen by me If we end up with the ML being out of sync with the web then i think its time to abadon roundup, roundup is too buggy and luca does not seem to have the time to admin it properly. The only alternative i see (if the mails arent just stuck but rather lost) is to delete all changes that happened after the ML failed and require people to resubmit it all and as has been said previously, we do need more manpower to admin the tracker be that roundup or something else, volunteers needed and welcome! [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything ms did were stupid they would be bankrupt already.
michael <subversion <at> mplayerhq.hu> writes:
Author: michael Date: Thu Apr 16 06:46:44 2009 New Revision: 18533
Log: Support broken avc nal encapsulation. Fixes issue987.
This broke the samples in /samples/ffmpeg-bugs/roundup/issue2517 See issue 2517. Carl Eugen
participants (3)
-
cehoyos@ag.or.at -
michaelni@gmx.at -
subversion@mplayerhq.hu