Comment #14 on issue 16020 by ffmpeg: FFmpegDemuxer should be duplicating
every packet of encoded data
http://code.google.com/p/chromium/issues/detail?id=16020
Firstly, thanks for the commit, it really fixed the crupt bug when I play
MKV files
by media_player.exe
but I am very curious on the modification of cloning all packets which is
obtained
directly frome av_read_frame().
the packet obtained by av_read_frame() should not be affected by subswquent
calls to
av_read_frame() because the packect's data is malloced every time by ffmpeg.
"The AVPackets returned from av_read_frame() are not guaranteed to be valid
after subsequent calls to av_read_frame()."---Why? how can I reproduce this
bug?
I compiled the media_project by VS2008 applied the following hack:
FFmpegDemuxerStream* demuxer_stream =
packet_streams_[packet->stream_index];
if (demuxer_stream) {
#if 0
// Duplicate the entire packet to avoid aliasing.
// Directly affects MP3, but do all formats to be safe.
scoped_ptr<AVPacket> clone(ClonePacket(packet.get()));
if (!clone.get()) {
NOTREACHED();
return;
}
// Free FFmpeg-allocated memory and swap original packet into |clone| so
// that it gets deleted as |clone| goes out of scope.
av_free_packet(packet.get());
packet.swap(clone);
#endif
// Queue the packet with the appropriate stream. The stream takes
// ownership of the AVPacket.
current_timestamp_ = demuxer_stream->EnqueuePacket(packet.release());
} else {
av_free_packet(packet.get());
}
That is: I do not perform any packet clone operation, I play a lot of mp3
files by
media_player.exe, all my tests are OK!
Could you tell me how to produce the bug related with the following commit:
http://src.chromium.org/viewvc/chrome/trunk/src/media/filters/ffmpeg_demuxer.cc?
r1=16514&r2=16525&pathrev=23455
Thanks a lot
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---